package com.shhic.hhplt.server.model;

import com.baomidou.mybatisplus.annotation.TableName;

import java.util.LinkedList;
import java.util.List;
import java.util.Queue;

@TableName(value = "boxnumber")
public class BoxNumber {
	/* 标识 ，格式 代号[@场景]，其中场景可选，如mac@重庆产线 */
	private String codeName;
	/* 镭雕机名称 */
	private String carvingsName;
	/* 描述 */
	private String description;
	private String scheme;
	/* 当前编码值*/
	private String nowCode;
	/* 当前箱号 */
	private Integer caseCode;
	/* 每箱数量 */
	private Integer quantity;
	private Integer isCycle;
	/* 是否可用 */
	private Integer isAvailable;
	/* 镭雕机已镭雕数量*/
	private Integer count;
	private Queue<String> retrievedCodeList = new LinkedList<String>();
	
	public String getCarvingsName() {
		return carvingsName;
	}
	public void setCarvingsName(String carvingsName) {
		this.carvingsName = carvingsName;
	}
	public String getScheme() {
		return scheme;
	}
	public void setScheme(String scheme) {
		this.scheme = scheme;
	}
	public String getNowCode() {
		return nowCode;
	}
	public void setNowCode(String nowCode) {
		this.nowCode = nowCode;
	}
	public Queue<String> getRetrievedCodeList() {
		return retrievedCodeList;
	}
	public void setRetrievedCodeList(List<String> retrievedCodeList) {
		this.retrievedCodeList.clear();
		this.retrievedCodeList.addAll(retrievedCodeList);
	}
	public String getCodeName() {
		return codeName;
	}
	public void setCodeName(String codeName) {
		this.codeName = codeName;
	}
	
	public String getCodeNameTitle(){
		//由codeName，截取代号部分
		if(!codeName.contains("@")){
			return codeName;
		}else{
			return codeName.split("@")[0];
		}
	}
	
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Integer getIsCycle() {
		return isCycle;
	}
	public void setIsCycle(Integer isCycle) {
		this.isCycle = isCycle;
	}
	public int getIsAvailable() {
		return isAvailable;
	}
	
	public boolean isAvailable(){
		return isAvailable != 0;
	}
	
	public void setIsAvailable(int isAvailable) {
		this.isAvailable = isAvailable;
	}

	public Integer getCaseCode() {
		return caseCode;
	}

	public void setCaseCode(Integer caseCode) {
		this.caseCode = caseCode;
	}

	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}
}
